<?php
/*
htmlentities(
string $string,
int $flags = ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401,
?string $encoding = null,
bool $double_encode = true
): string
 */
//htmlentities — 将字符转换为 HTML 转义字符

$orig = "I'll \"walk\" the <b>dog</b> now";
$a = htmlentities($orig);
echo $a;
